<?php

$this->breadcrumbs = array(
	$model->label(2) => array('index'),
	Yii::t('translations', 'Manage'),
);

$this->menu = array(
		array('label'=>Yii::t('translations', 'List') . ' ' . $model->label(2), 'url'=>array('index')),
		array('label'=>Yii::t('translations', 'Create') . ' ' . $model->label(), 'url'=>array('create')),
	);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('user-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1><?php echo Yii::t('translations', 'Manage') . ' ' . GxHtml::encode($model->label(2)); ?></h1>

<p>
<?php echo Yii::t('translations', 'opcion_busqueda');?>
</p>

<?php echo GxHtml::link(Yii::t('translations','busqueda_avanzada'), '#', array('class' => 'search-button')); ?>
<div class="search-form">
<?php $this->renderPartial('_search', array(
	'model' => $model,
)); ?>
</div><!-- search-form -->

<?php   $this->widget('bootstrap.widgets.TbGridView', array(
    'id'=>'user-grid',
    'type'=>'striped bordered condensed',
	'filter'=>$model,
    'dataProvider'=>$model->search(),
    'template'=>"{summary}\n{items}\n{pager}",
    'columns'=>array(	
		'username',
		'password',
		'email',
		'profile',
		array(
            'class'=>'bootstrap.widgets.TbButtonColumn',
            'htmlOptions'=>array('style'=>'width: 150px; margin:0 5px'),
	        'template'=>'{view}',
	        
		        	),
	        	
       
	),
)); ?>